package tv.geir.slackspace.space;

import tv.geir.slackspace.communication.Request;
import tv.geir.slackspace.communication.Response;
/**
 * 
 * @author Geir Gullestad Pettersen
 *
 */
public interface IRequestProcessor {
	
	/**
	 * Processes a request in a SlackSpace and returns a response which
	 * represents the outcome of the processing.<p>
	 * <p>
	 * This method should never throw unchecked exceptions, but
	 * return them via the <code>Response</code> object instead. The response type
	 * should then be set to <code>Response.Code.ERROR</code> and the exception  
	 * itself wrapped inside the Reponse object in the <code>data</code> property
	 * (<code>Response.setData( myThrowable )</code>.
	 * @param request
	 * @return
	 */
	public Response process( Request request );
}
